<?php
/**
* @version $Id: frontstats.php 2092 2010-03-23 02:25:45Z mahagr $
* Kunena Component
* @package Kunena
*
* @Copyright (C) 2008 - 2009 Kunena Team All rights reserved
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.com
*
* Based on FireBoard Component
* @Copyright (C) 2006 - 2007 Best Of Joomla All rights reserved
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.bestofjoomla.com
*
* Based on Joomlaboard Component
* @copyright (C) 2000 - 2004 TSMF / Jan de Graaff / All Rights Reserved
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @author TSMF & Jan de Graaff
**/

// Dont allow direct linking
defined( '_JEXEC' ) or die('Restricted access');

$fbConfig =& CKunenaConfig::getInstance();
$forumurl = JRoute::_(KUNENA_LIVEURLREL);
$statslink = JRoute::_(KUNENA_LIVEURLREL.'&amp;func=stats');

if ($fbConfig->fb_profile == "jomsocial")
{
        $userlist = JRoute::_('index.php?option=com_community&amp;view=search&amp;task=browse');
}
else if ($fbConfig->fb_profile == 'cb')
{
    $userlist = CKunenaCBProfile::getUserListURL();
}
else
{
    $userlist = JRoute::_(KUNENA_LIVEURLREL . '&amp;func=userlist');
}

if ($fbConfig->showstats > 0)
{
    if ($fbConfig->showgenstats > 0)
    {
?>
        <!-- BEGIN: GENERAL STATS -->
<div class="<?php echo $boardclass; ?>_bt_cvr1">
<div class="<?php echo $boardclass; ?>_bt_cvr2">
<div class="<?php echo $boardclass; ?>_bt_cvr3">
<div class="<?php echo $boardclass; ?>_bt_cvr4">
<div class="<?php echo $boardclass; ?>_bt_cvr5">
        <table  class = "fb_blocktable" id ="fb_frontstats" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
            <thead>
                <tr>
                    <th colspan="7" align="left">
                        <div class = "fb_title_cover fbm">
                            <a class="fb_title fbl" href = "<?php echo $statslink;?>"><?php echo stripslashes($fbConfig->board_title); ?> <?php echo _STAT_FORUMSTATS; ?></a>
                        </div>
                        <img id = "BoxSwitch_frontstats__frontstats_tbody" class = "hideshow" src = "<?php echo KUNENA_URLIMAGESPATH . 'shrink.gif' ; ?>" alt = ""/>
                    </th>
                </tr>
            </thead>

            <tbody id = "frontstats_tbody">
                <tr class = "<?php echo $boardclass ;?>sectiontableentry3">
                <td style="border-left:1px solid #BFC3C6" width="9%"  align="center" valign="middle" class="<?php echo $boardclass ;?>sectiontableentry4">
                    <img src="<?php echo KUNENA_URLICONSPATH . 'members.png' ; ?>" alt="Estadísticas de Usuarios" />
                    </td>
                    <td width="24%" align="left" valign="top" class="fbsx"><br/>
                    <span style="font-size:13px"><b><?php echo _STAT_USERS; ?></b></span><br/>
                    <span style="color:#F48703"><?php echo _STAT_TOTAL_USERS; ?></span>: <b> <a href="<?php echo $userlist;?>"><?php echo $totalmembers; ?></a> </b><br/>
                    <span style="color:#F48703"><?php echo _STAT_LATEST_MEMBERS; ?></span>: <b> <?php echo CKunenaLink::GetProfileLink($fbConfig, $lastestmemberid, $lastestmember, $rel='nofollow'); ?></b><br/>

&raquo; <a href="<?php echo $userlist;?>"><?php echo _STAT_USERLIST; ?></a><br/>
<?php if ($fbConfig->showpopuserstats || $fbConfig->showpopsubjectstats) echo '&raquo; <a href="'.$statslink.'">'. _STAT_MORE_ABOUT_STATS.'</a>'; ?><br/><br/></td>

                    <td width="8%"  align="center" valign="middle" class="<?php echo $boardclass ;?>sectiontableentry4">
                        <img src="<?php echo KUNENA_URLICONSPATH . 'stats.png' ; ?>" alt="Estadísticas de Mensajes"/>
                    <br/></td>

                <td width="26%" align="left" valign="middle" class="<?php echo $boardclass ;?>sectiontableentry5 fbsx">
                <span style="font-size:13px"><b><?php echo _STAT_MESSAGES; ?></b></span><br/>
                <span style="color:#F48703"><?php echo _STAT_TOTAL_MESSAGES; ?></span>: <b> <?php echo $totalmsgs; ?></b> &nbsp;<br/>
                <span style="color:#F48703"><?php echo _STAT_TOTAL_SUBJECTS; ?></span>: <b> <?php echo $totaltitles; ?></b> &nbsp;<br/>
                <span style="color:#F48703"><?php echo _STAT_TOTAL_SECTIONS; ?></span>: <b> <?php echo $totalcats; ?></b> &nbsp;<br/>
                <span style="color:#F48703"><?php echo _STAT_TOTAL_CATEGORIES; ?></span>: <b> <?php echo $totalsections; ?></b><br/>
                <br/></td>

                <td width="8%" align="center" valign="middle" class="<?php echo $boardclass ;?>sectiontableentry5 fbsx">
                <img src="<?php echo KUNENA_URLICONSPATH . 'paper.png' ; ?>" alt="Estadísticas de Mensajes"/></td>

                <td width="18%" align="left" valign="top" class="<?php echo $boardclass ;?>sectiontableentry5 fbsx"><br/>
                <span style="font-size:13px"><b><?php echo Publicaciones; ?></b></span><br/>
                <span style="color:#F48703"><?php echo _STAT_TODAY_OPEN_THREAD; ?></span>: <b> <?php echo $todayopen; ?></b> &nbsp;<br/>
                <span style="color:#F48703"><?php echo _STAT_YESTERDAY_OPEN_THREAD; ?></span>: <b> <?php echo $yesterdayopen; ?></b> &nbsp;<br/>
                <span style="color:#F48703"><?php echo _STAT_TODAY_TOTAL_ANSWER; ?></span>: <b> <?php echo $todayanswer; ?></b> &nbsp;<br/>
                <span style="color:#F48703"><?php echo _STAT_YESTERDAY_TOTAL_ANSWER; ?></span>: <b> <?php echo $yesterdayanswer; ?></b><br/>
                <br/><br/></td>
                    <td style="border-right:1px solid #BFC3C6" width="7%" align="right" valign="middle" class="<?php echo $boardclass ;?>sectiontableentry5 fbsx"><a href="http://validator.w3.org/check?uri=referer" target="_blank"><img src="<?php echo KUNENA_URLICONSPATH . 'xhtml.gif' ; ?>" alt="Valid XHTML 1.0 Transitional" width="61" height="13" hspace="10" vspace="10" /></a></td>
                </tr>
            </tbody>
        </table>
        </div>
</div>
</div>
</div>
</div>
<!-- FINISH: GENERAL STATS -->

<?php
    }
?>

<?php
}
?>
